<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function maxArr(arr) {
        var max = arr[0]
        for (i = 1; i < arr.length; i++) {
          if (arr[i] >= max) {
            max = arr[i]
          }
        }
      }
    </script>
  </body>
</html>
